from rest_framework.serializers import ModelSerializer, DateTimeField, SerializerMethodField
from .models import *


class StatusSerializer(ModelSerializer):
    class Meta:
        model = Status
        fields = "__all__"


class LevenSerializer(ModelSerializer):
    class Meta:
        model = Leven
        fields = "__all__"


class CoachSerializer(ModelSerializer):
    leven = LevenSerializer()
    status = StatusSerializer()

    class Meta:
        model = Coach
        fields = "__all__"


class MemberSerializer(ModelSerializer):
    class Meta:
        model = Member
        fields = "__all__"


class CartSerializer(ModelSerializer):
    member = MemberSerializer()
    coach = CoachSerializer()

    class Meta:
        model = Cart
        fields = "__all__"
